import axios from 'axios'
// axios全局封装处理
const isDev = process.env.NODE_ENV === 'development'
export const service = axios.create()
service.interceptors.request.use((config) => {
    config.data = Object.assign({}, config.data, {

    })
    return config
})

service.interceptors.response.use((resp) => {
    if (resp.data.code === 200) {
        return resp.data.data
    } else {
        // 全局处理错误
        message.error(resp.data.errMsg)
    }
})
